package com.tian.controller;

import com.tian.annotation.ArgsLogAnnotation;
import com.tian.dto.ChargeRecordListReqDto;
import com.tian.dto.ChargeRecordListRespDto;
import com.tian.service.ChargeRecordService;
import com.tian.util.CommonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author tianwc  公众号：java后端技术全栈、面试专栏
 * @version 1.0.0
 * @date 2023年05月12日 15:25
 * 博客地址：<a href="http://woaijava.cc/">博客地址</a>
 * <p>
 * 用户充电记录
 */
@RestController
@RequestMapping("/chargeRecord")
public class ChargeRecordController {

    @Resource
    private ChargeRecordService chargeRecordService;

    @ArgsLogAnnotation
    @PostMapping("/page")
    public CommonResult<ChargeRecordListRespDto> page(@RequestBody ChargeRecordListReqDto chargeRecordListReqDto) {
        return chargeRecordService.page(chargeRecordListReqDto);
    }
}
